/**
 * THIS FILE IS PART OF huodull PROJECT PayAccount.java - The core part of the payAccount Entity layer
 * 
 * @Copyright: 2017-5-26 www.huodull.com Inc. All rights reserved.
 */

package com.egzosn.entity.pay;

import com.egzosn.pay.common.bean.MsgType;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * pay_account 实体类
 * 
 * @author egan
 * @email egzosn@gmail.com
 * @date 2017-5-26 15:33:29
 */
@Table(name = "pay_account")
@Entity
public class PayAccount {

    // 支付账号id
    @Id
    @GeneratedValue
    @Column(name = "pay_id")
    private Integer payId;
    // 支付合作id,商户id，差不多是支付平台的账号或id
    @Column(name = "partner")
    private String partner;
    // 应用id
    @Column(name = "appid")
    private String appid;
    // 支付公钥，sign_type只有单一key时public_key与private_key相等，比如sign_type=MD5的情况
    @Column(name = "public_key")
    private String publicKey;
    // 支付私钥
    @Column(name = "private_key")
    private String privateKey;
    // 异步回调地址
    @Column(name = "notify_url")
    private String notifyUrl;
    // 同步回调地址
    @Column(name = "return_url")
    private String returnUrl;
    // 收款账号, 针对支付宝
    @Column(name = "seller")
    private String seller;
    // 签名类型
    @Column(name = "sign_type")
    private String signType;
    // 枚举值，字符编码 utf-8,gbk等等
    @Column(name = "input_charset")
    private String inputCharset;
    // 支付类型,aliPay：支付宝，wxPay：微信, youdianPay: 友店微信,此处开发者自定义对应com.egzosn.entity.pay.PayType枚举值
    @Enumerated(EnumType.STRING)
    @Column(name = "pay_type")
    private PayType payType;
    // 消息类型，text,xml,json
    @Enumerated(EnumType.STRING)
    @Column(name = "msg_type")
    private MsgType msgType;
    // 创建人
    @Column(name = "create_by")
    private String createBy;
    // 创建时间
    @Column(name = "create_time")
    private Timestamp createTime;
    // 是否为测试环境
    @Column(name = "is_test")
    private boolean isTest;

    public void setPayId(Integer payId) {
        this.payId = payId;
    }

    public Integer getPayId() {
        return payId;
    }

    public void setPartner(String partner) {
        this.partner = partner;
    }

    public String getPartner() {
        return partner;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getAppid() {
        return appid;
    }

    public void setPublicKey(String publicKey) {
        this.publicKey = publicKey;
    }

    public String getPublicKey() {
        return publicKey;
    }

    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }

    public String getPrivateKey() {
        return privateKey;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setReturnUrl(String returnUrl) {
        this.returnUrl = returnUrl;
    }

    public String getReturnUrl() {
        return returnUrl;
    }

    public void setSeller(String seller) {
        this.seller = seller;
    }

    public String getSeller() {
        return seller;
    }

    public void setSignType(String signType) {
        this.signType = signType;
    }

    public String getSignType() {
        return signType;
    }

    public void setInputCharset(String inputCharset) {
        this.inputCharset = inputCharset;
    }

    public String getInputCharset() {
        return inputCharset;
    }

    public void setPayType(PayType payType) {
        this.payType = payType;
    }

    public PayType getPayType() {
        return payType;
    }

    public void setMsgType(MsgType msgType) {
        this.msgType = msgType;
    }

    public MsgType getMsgType() {
        return msgType;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public boolean isTest() {
        return isTest;
    }

    public void setTest(boolean test) {
        isTest = test;
    }
}
